<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
 
<html> 
	<head>
		<title>用户登录</title>
	</head>
	<script type="text/javascript">
	    function checkForm(form){
	        if(form.usersID.value == ""){
	            alert("用户名不能为空!");
	            form.usersID.focus();
	            return false;
	        }
	        if(form.password.value == ""){
	            alert("密码不能为空!");
	            form.password.focus();
	            return false;
	        }
	    return true;
	    }
	</script>
	<body>
		<html:form action="/usersLogin" onsubmit="return checkForm(this);">
			用户名 : <html:text property="usersID"/><html:errors property="usersID"/><br/>
			密 码: <html:password property="password"/><html:errors property="password"/><br/>
			<html:submit value="登陆"/><a href="index.jsp">返回首页</a>
		</html:form>
	</body>
</html>

